package com.zheng.upms.server.controller.task;

import com.zheng.common.base.BaseController;
import com.zheng.upms.common.constant.UpmsConstant;
import com.zheng.upms.common.constant.UpmsResult;
import com.zheng.upms.common.constant.UpmsResultConstant;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * @author lvg EMIAL：<a href="mailto:weiguo.liang@gh-ca.com">weiguo.liang@gh-ca.com</a> <br>
 * @version 1.0 <br>
 * @Company: GH-CA<br>
 * @ClassName: TestHttpJobController <br>
 * @Description: TODO <br>
 * @date 2019/8/5 16:47<br>
 **/
@RestController
@RequestMapping("/task/testJob")
@Api(value = "测试Http任务调度控制器", description = "测试任务调度控制器")
public class TestHttpJobController  extends BaseController{

    @ApiOperation(value = "任务调度首页")
    @RequestMapping(value = "/run", method = {RequestMethod.POST})
    public Object run( HttpServletRequest request) {
        Map params = request.getParameterMap();
        String  a = request.getParameter("a");
        System.out.println("http 任务执行================="+params.size());
        return new UpmsResult(UpmsResultConstant.SUCCESS,null);
    }
}
